﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Models
{
    /// <summary>
    /// 销售列表实体类
    /// </summary>
    [Serializable]
    public class SalesListMain
    {
        public SalesListMain()
        {
            this.salesLists = new List<SalesListDetail>();
        }

        public string SerialNum { get; set; }  //流水号
        public decimal TotalMoney { get; set; }  //商品总计金额
        public decimal RealReceive { get; set; }  //实收款
        public decimal ReturnMoney { get; set; }  //找零
        public int SalesPersonId { get; set; }  //销售员编号
        public DateTime SaleDate { get; set; }  //销售日期

        //两个对象一对多的关系
        public List<SalesListDetail> salesLists { get; set; }

    }


    /// <summary>
    /// 销售明细
    /// </summary>
    [Serializable]
    public class SalesListDetail
    {
        public int Id { get; set; }

        public string SerialNum { get; set; }  //流水号
        public string ProductId { get; set; }  //商品编号
        public string ProductName { get; set; } //商品名称
        public decimal UnitPrice { get; set; }  //单价

        public int Discount { get; set; }  //折扣

        public int Quantity { get; set; }  //购买数量
        public decimal SubTotalMoney { get; set; }  //小计金额

    }

}
